Repository navigation
Accept BT.601 HEVC colour in bounded decoding - #20
laurens-pilot wants to merge 1 commit into
Conversation
Samsung HEICs carry no colr box and signal BT.601 primaries in the HEVC VUI. The full decoder renders these as untagged sRGB, but the bounded path rejected them as unprofiled colour. Treat VUI primaries 5 and 6 like 1 and 2 so bounded output matches the full decoder; wide-gamut VUI-only colour is still rejected.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Superseded by ente#31. |
Samsung HEICs have no
colrbox and signal BT.601 colour (primaries 5, transfer 6, matrix 5, full range) only in the HEVC stream. The full decoder returns these as untagged RGB, butdecode_boundedrejected them withUnsupported("unprofiled HEVC color"). It now treats stream-signalled BT.601 primaries (5 and 6) like sRGB, as it already did for 1 and 2. Images whose stream signals a wide gamut (BT.2020, P3) with nocolrbox are still rejected.On a Galaxy S22 motion-photo HEIC (3000×4000),
decode_boundednow matchesdecode_bytes_to_rgb8exactly. Apple's ImageIO also reports this file as sRGB. Converting the BT.601 primaries to sRGB instead would have moved the output away from both: it differs from the full decoder by up to 14 levels, and agreement with ImageIO within ±1 drops from 97.3% to 90.2% of samples.